/*
 * Created on 17-ene-2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package hotel.ejb;

import java.rmi.RemoteException;

import javax.ejb.EJBException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;

/**
 * @ejb.bean name="Habitacio"
 *           display-name="Name for Habitacio"
 *           description="Description for Habitacio"
 *           jndi-name="ejb/Habitacio"
 *           type="CMP"
 *           cmp-version="2.x"
 *           view-type="local"
 * 
 * @ejb.persistence table-name="Habitacio"
 *   
 * @ejb.value-object match="*" 
 *                   name="Habitacio"
 * 
 * @jboss.persistence create-table="true"
 *                    remove_table="false"
 * 
 * @ejb.util generate="physical"
 * 
 * @ejb.finder signature="java.util.Collection findAll()" result-type-mapping="Local"
 */
public abstract class HabitacioBean implements EntityBean {

	/**
	 * 
	 */
	public HabitacioBean() {
		super();
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#ejbActivate()
	 */
	public void ejbActivate() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#ejbLoad()
	 */
	public void ejbLoad() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#ejbPassivate()
	 */
	public void ejbPassivate() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#ejbRemove()
	 */
	public void ejbRemove()
		throws RemoveException,
		EJBException,
		RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#ejbStore()
	 */
	public void ejbStore() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
	 */
	public void setEntityContext(EntityContext ctx)
		throws EJBException,
		RemoteException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see javax.ejb.EntityBean#unsetEntityContext()
	 */
	public void unsetEntityContext() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/**
	 * Getter for CMP Field ID
	 *
	 * @ejb.pk-field
	 * @ejb.persistent-field
	 * @ejb.interface-method   view-type="both"
	 */
	public abstract java.lang.Integer getID();

	/**
	 * Setter for CMP Field ID
	 *
	 * @ejb.interface-method   view-type="both"
	 */
	public abstract void setID(java.lang.Integer value);

	/**
	 * Create method
	 * @ejb.create-method  view-type = "both"
	 */
	public hotel.interfaces.HabitacioPK ejbCreate(
		hotel.interfaces.HabitacioValue value) throws javax.ejb.CreateException {
		// TODO Auto-generated method stub
		this.setID(value.getID());
		this.setTipus(value.getTipus());
		return null;
	}
	/**
	 * Post Create method
	 */
	public void ejbPostCreate(hotel.interfaces.HabitacioValue value)
		throws javax.ejb.CreateException {
		// TODO Auto-generated method stub
	}
	/**
	 * Getter for CMP Field Tipus
	 *
	 * 
	 * @ejb.persistent-field
	 * @ejb.interface-method   view-type="both"
	 */
	public abstract java.lang.Integer getTipus();

	/**
	 * Setter for CMP Field Tipus
	 *
	 * @ejb.interface-method   view-type="both"
	 */
	public abstract void setTipus(java.lang.Integer value);
	
	/**
	* @ejb.interface-method view-type="local"
	* 
	* @ejb.relation           name = "ReservaHabitacio"
	*                         role-name = "habitacio-esta-reservada"
	* 						  target-multiple="yes"
	* 
	* * @jboss.relation-mapping
    *      style="relation-table" 
    * 
    * @jboss.relation-table
    *      table-name="ReservaHabitacions"
    *      create-table="true"
    *      remove-table="false"
    * 
    * @jboss.relation
    *      related-pk-field="ID"
    *      fk-column="reserva_id_fk"
    *      fk-constraint="false"
	* 
	*/
	public abstract java.util.Collection getReserves();

	/**
	* @ejb.interface-method
	*      view-type="local"
	*/
	public abstract void setReserves(java.util.Collection value);

}